﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Yuan.MVC.Demo.Controllers
{
    [Route("[Controller]/[Action]")]
    [ApiController]
    [Authorize]
    public class APIController : ControllerBase
    {
        public IActionResult Index()
        {
            var sddd = from c in User.Claims select new { c.Type, c.Value };
            return new JsonResult(from c in User.Claims select new { c.Type, c.Value });
        }
    }
}
